\usepackage{amsmath,amsfonts,amssymb}
\usepackage{array}
%=================================== 数学符号 =================================%

\newcommand{\abs}[1]{\left|#1\right|}
\newcommand{\norm}[1]{\left\|#1\right\|}
\newcommand{\trace}[1]{\mathrm{Tr}\left(#1\right)}
\newcommand{\rank}[1]{\mathrm{Rank}\left(#1\right)}
\newcommand{\diag}[1]{\mathrm{diag}\left\{#1\right\}}
\newcommand{\prob}[1]{\Pr\left\{#1\right\}}
\newcommand{\maximize}[2]{\underset{#1}{\max}\,#2}
\newcommand{\minimize}[2]{\underset{#1}{\min}\,#2}
\newcommand{\st}{\mathrm{s.t.}}
\newcommand{\dom}[1]{\mathbf{dom}~#1}
\newcommand{\inffun}[2]{\underset{#1}{\inf}~#2}
\newcommand{\supfun}[2]{\underset{#1}{\sup}~#2}
\newcommand{\erf}[1]{\mathrm{erf}\left(#1\right)}
\newcommand{\erfc}[1]{\mathrm{erfc}\left(#1\right)}
\newcommand{\mean}[1]{\mathbb{E}\left\{#1\right\}}
\newcommand{\var}[1]{\mathrm{var}\left(#1\right)}
\newcommand{\defint}[4]{\int_{#2}^{#3}#4\,\mathrm{d}#1}

% 特殊矩阵或向量
\newcommand{\vones}{\mathbf{1}}
\newcommand{\vzeros}{\mathbf{0}}

% 信息论相关
\newcommand{\diffentropybit}[2]{-\int_{-\infty}^{\infty}#2\log_2#2\,\mathrm{d}#1}
\newcommand{\diffentropynat}[2]{-\int_{-\infty}^{\infty}#2\log#2\,\mathrm{d}#1}
\newcommand{\ndiffentropybit}[2]{\int_{-\infty}^{\infty}#2\log_2#2\,\mathrm{d}#1}
\newcommand{\ndiffentropynat}[2]{\int_{-\infty}^{\infty}#2\log#2\,\mathrm{d}#1}

% 字母表

\newcommand{\bfa}{\mathbf{a}}
\newcommand{\bfb}{\mathbf{b}}
\newcommand{\bfc}{\mathbf{c}}
\newcommand{\bfd}{\mathbf{d}}
\newcommand{\bfe}{\mathbf{e}}
\newcommand{\bff}{\mathbf{f}}
\newcommand{\bfg}{\mathbf{g}}
\newcommand{\bfh}{\mathbf{h}}
\newcommand{\bfi}{\mathbf{i}}
\newcommand{\bfj}{\mathbf{j}}
\newcommand{\bfk}{\mathbf{k}}
\newcommand{\bfl}{\mathbf{l}}
\newcommand{\bfm}{\mathbf{m}}
\newcommand{\bfn}{\mathbf{n}}
\newcommand{\bfo}{\mathbf{o}}
\newcommand{\bfp}{\mathbf{p}}
\newcommand{\bfq}{\mathbf{q}}
\newcommand{\bfr}{\mathbf{r}}
\newcommand{\bfs}{\mathbf{s}}
\newcommand{\bft}{\mathbf{t}}
\newcommand{\bfu}{\mathbf{u}}
\newcommand{\bfv}{\mathbf{v}}
\newcommand{\bfw}{\mathbf{w}}
\newcommand{\bfx}{\mathbf{x}}
\newcommand{\bfy}{\mathbf{y}}
\newcommand{\bfz}{\mathbf{z}}

\newcommand{\bfA}{\mathbf{A}}
\newcommand{\bfB}{\mathbf{B}}
\newcommand{\bfC}{\mathbf{C}}
\newcommand{\bfD}{\mathbf{D}}
\newcommand{\bfE}{\mathbf{E}}
\newcommand{\bfF}{\mathbf{F}}
\newcommand{\bfG}{\mathbf{G}}
\newcommand{\bfH}{\mathbf{H}}
\newcommand{\bfI}{\mathbf{I}}
\newcommand{\bfJ}{\mathbf{J}}
\newcommand{\bfK}{\mathbf{K}}
\newcommand{\bfL}{\mathbf{L}}
\newcommand{\bfM}{\mathbf{M}}
\newcommand{\bfN}{\mathbf{N}}
\newcommand{\bfO}{\mathbf{O}}
\newcommand{\bfP}{\mathbf{P}}
\newcommand{\bfQ}{\mathbf{Q}}
\newcommand{\bfR}{\mathbf{R}}
\newcommand{\bfS}{\mathbf{S}}
\newcommand{\bfT}{\mathbf{T}}
\newcommand{\bfU}{\mathbf{U}}
\newcommand{\bfV}{\mathbf{V}}
\newcommand{\bfW}{\mathbf{W}}
\newcommand{\bfX}{\mathbf{X}}
\newcommand{\bfY}{\mathbf{Y}}
\newcommand{\bfZ}{\mathbf{Z}}

\newcommand{\calA}{\mathcal{A}}
\newcommand{\calB}{\mathcal{B}}
\newcommand{\calC}{\mathcal{C}}
\newcommand{\calD}{\mathcal{D}}
\newcommand{\calE}{\mathcal{E}}
\newcommand{\calF}{\mathcal{F}}
\newcommand{\calG}{\mathcal{G}}
\newcommand{\calH}{\mathcal{H}}
\newcommand{\calI}{\mathcal{I}}
\newcommand{\calJ}{\mathcal{J}}
\newcommand{\calK}{\mathcal{K}}
\newcommand{\calL}{\mathcal{L}}
\newcommand{\calM}{\mathcal{M}}
\newcommand{\calN}{\mathcal{N}}
\newcommand{\calO}{\mathcal{O}}
\newcommand{\calP}{\mathcal{P}}
\newcommand{\calQ}{\mathcal{Q}}
\newcommand{\calR}{\mathcal{R}}
\newcommand{\calS}{\mathcal{S}}
\newcommand{\calT}{\mathcal{T}}
\newcommand{\calU}{\mathcal{U}}
\newcommand{\calV}{\mathcal{V}}
\newcommand{\calW}{\mathcal{W}}
\newcommand{\calX}{\mathcal{X}}
\newcommand{\calY}{\mathcal{Y}}
\newcommand{\calZ}{\mathcal{Z}}

\newcommand{\bbC}{\mathbb{C}}
\newcommand{\bbE}{\mathbb{E}}
\newcommand{\bbR}{\mathbb{R}}